package com.rsk.dao;

import com.rsk.entity.SysCompanyContacts;
import com.rsk.entity.SysCompanyContracts;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface SysCompanyContractsRepository {


    @Modifying
    @Query(value = "update sys_company_contracts set is_del = 1, operator_user =?2, operator_time = NOW() where id =?1", nativeQuery = true)
    public int delSysCompanyContracts(Long id, Long operatorUser);

    @Query(value = "select 1 from sys_company_contracts where id =?1 and is_del = 0", nativeQuery = true)
    public SysCompanyContracts selectSysCompanyContractsById(Long id);
}
